To add actions and outlets to an existing class:
To create an action, declare a method that takes a single argument named sender and that returns void or that is coerced to be a action, like this:
- (IBAction)foo: (id)Sender;
To create an outlet, declare an instance variable that is of type
Id
or that has the
IBOutlet
keyword prefixed to its declaration.
If you add the actions and outlets in Interface Builder and then generate new header and implementation files, you'll lose any changes you've made to the files.